package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.SongsInfoMapper;
import com.aidex.biz.domain.SongsInfo;
import com.aidex.biz.service.SongsInfoService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 演唱会信息Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2023-07-07
 */
@Service
@Transactional(readOnly = true)
public class SongsInfoServiceImpl extends BaseServiceImpl<SongsInfoMapper, SongsInfo> implements SongsInfoService
{
    private static final Logger log = LoggerFactory.getLogger(SongsInfoServiceImpl.class);

    /**
     * 获取单条数据
     * @param songsInfo 演唱会信息
     * @return 演唱会信息
     */
    @Override
    public SongsInfo get(SongsInfo songsInfo)
    {
        SongsInfo dto = super.get(songsInfo);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 演唱会信息id
     * @return 演唱会信息
     */
    @Override
    public SongsInfo get(String id)
    {
        SongsInfo dto = super.get(id);
        return dto;
    }


    /**
     * 查询演唱会信息列表
     * @param songsInfo 演唱会信息
     * @return 演唱会信息
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<SongsInfo> findList(SongsInfo songsInfo)
    {
        return super.findList(songsInfo);
    }

    /**
     * 分页查询演唱会信息列表
     * @param songsInfo 演唱会信息
     * @return 演唱会信息
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<SongsInfo> findPage(SongsInfo songsInfo)
    {
        return super.findPage(songsInfo);
    }

    /**
     * 保存演唱会信息
     * @param songsInfo
     * @return 结果
     */
    @Override
    public boolean save(SongsInfo songsInfo)
    {
        return super.save(songsInfo);
    }


    /**
     * 删除演唱会信息信息
     * @param songsInfo
     * @return 结果
     */
    @Override
    public boolean remove(SongsInfo songsInfo)
    {
        return super.remove(songsInfo);
    }

    /**
     * 批量删除演唱会信息
     * @param ids 需要删除的演唱会信息ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteSongsInfoByIds(String[] ids)
    {
        return mapper.deleteSongsInfoByIds(ids);
    }

    /**
     * 获取最大编号
     * @param songsInfo 演唱会信息
     * @return 结果
     */
    @Override
    public int findMaxSort(SongsInfo songsInfo)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(songsInfo));
    }
}
